Array.prototype.dyx_flat = function(deep = 1){
    if(deep < 1) return this;
    const res = this
    while(res.some(item => Array.isArray(item)|| deep > 0)){
        res = [].concat(...res)
        deep --
    }
    return res
}